package com.ruicar.afs.cloud.parameter.commom.enums;

import lombok.Getter;

/**
 * @description: 运营方式枚举
 * @author: sijun.yu
 * @date: 2020/5/13 19:31
 */
@Getter
public enum OperateWay {

    NO("00", "无"),
    NETWORK_CAR("01", "网约车");

    private final String index;
    private final String name;

    private OperateWay(String index, String name) {
        this.index = index;
        this.name = name;
    }

    public static String getName(String index) {
        for (OperateWay operateWay : OperateWay.values()) {
            if (operateWay.getIndex().equals(index)) {
                return operateWay.getName();
            }
        }
        return null;
    }
}
